<?php
namespace Home\Model;
use Think\Model;
class CompanyModel extends Model {
	public $table='zjy_company';
	public $page; //当前页
	public $perpage; //每页显示
	public $member_id; //ID
	public $post; //提交的信息 数组
	public $ids; //IDs 主要用于删除
	public $sorts; //IDs 主要用于删除
	public $keyword; //关键词

	//获取公司信息
	public function get_company_info()
	{
		$member_id=intval($this->member_id);
		// echo $member_id;exit;
		$Model=M("Company");
		$info=$Model->where('member_id='.$member_id)->find();
		// dump($info);exit;
		return $info;
	}
	//编辑
	public function company_edit_post()
	{
		$Model=M("Company");
		$condition['member_id'] = $this->post['member_id'];
		$data=$this->post;
		// dump($this->post);exit;
		$result=$Model->where($condition)->save($data);
		if($result === false) {
			return false;
		}else{
			return true;
		}
	}

}
?>